package org.sauceggplant.item.man.ui.toolbar;

import javax.swing.*;
import java.awt.*;

public class ToolBar extends JToolBar {
    private JLabel queryParam;
    private JTextField queryParamValue;
    private JButton query;
    private JButton add;
    private JButton save;
    private JButton delete;

    public ToolBar(JLabel queryParam) {
        this.setBackground(Color.lightGray);
        this.queryParam = queryParam;
        queryParamValue = new JTextField(15);
        query = new JButton("查询");
        add = new JButton("新增");
        save = new JButton("修改");
        delete = new JButton("删除");
        this.setLayout(new FlowLayout(FlowLayout.LEFT));
        this.add(this.queryParam);
        this.add(queryParamValue);
        this.add(query);
        this.add(add);
        this.add(save);
        this.add(delete);
    }

    public JTextField getQueryParamValue() {
        return queryParamValue;
    }

    public JButton getQuery() {
        return query;
    }

    public JButton getAdd() {
        return add;
    }

    public JButton getSave() {
        return save;
    }

    public JButton getDelete() {
        return delete;
    }
}
